<?php echo $html->css("screen/staff_parts.css");?>
<?php echo $this->element('menu', array("active" => "2.c"));?>
<ul class="breadcrumb">
<li>
  <?php echo $this->Html->link(__('Shop  ', true), array('action' => 'index', 'controller' => 'parts'), array('class'=>'fist_link'));?>
</li>
<li>          
  <?php echo $this->Html->link(__('Categories  ', true), array('action' => 'index'));?>
</li>
</ul>
<script>	  
	$(document).ready(function(){		
			
	});
</script>	  
<div id="content" class="partCategories form">	
	<?php echo $this->Html->link(__('Add category', true), array('action' => 'add'), array('class'=>'bt')); ?>	
	<div class="table table_p_15_2 boder">
	  <table width="100%"  cellpadding="0" cellspacing="0" align="right">
	<thead><tr>			
			<td></td>
			<td><?php echo $this->Paginator->sort('category');?></td>
			<td><?php echo $this->Paginator->sort('type');?></td>			
			<td class="actions"></td>
	</tr></thead>
	<tbody>
	<?php
	$i = 0;
	foreach ($partCategories as $partCategory):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>		
		<td width="150px"><img src="<?php echo $this->webroot.'files/uploads/categories/'.$partCategory['PartCategory']['photo']; ?>" class="thumbnail" /></td>
		<td><?php echo $partCategory['PartCategory']['category']; ?>&nbsp;</td>
		<td><?php echo $types[$partCategory['PartCategory']['type']]; ?>&nbsp;</td>		
		<td align="right" class="actions">			
			<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $partCategory['PartCategory']['id'])); ?>
			|&nbsp;<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $partCategory['PartCategory']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $partCategory['PartCategory']['id'])); ?>
		</td>
	</tr>	
<?php endforeach; ?>
</tbody>
	</table>
	</div>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>
	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?> |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
	</div>

